<?php 
defined('RUN_KATANA') or die('Restricted access');
if($user->getId() > 0)
{
	$mod = new Module($katana, 1);
	
	$buttons[0]['title'] = ucfirst($txt->getWord('my').' '.$txt->getWord('page'));
	$buttons[0]['href'] = '/c/2/';
	$buttons[0]['params']['class'] = 'btn btn-default';
	
	$buttons[1]['title'] = ucfirst($txt->getWord('logout'));
	$buttons[1]['href'] = '?action=logout';
	$buttons[1]['params']['class'] = 'btn btn-default';
	
	$mod->setButtonsContent($buttons);
	unset($buttons);
	?>
	<div class="logedinbox">
		<p>
		<?php 
			echo ucfirst($txt->getWord('you_are_loged_in_as')).' '; 
			$userDetails = new UserDetails($user); 
			$userDetails->LoadDetails;
			if($userDetails->getName() != '')
			{  echo $userDetails->getName(); }
			else
			{  echo $userDetails->getUsername(); }
		?>
		</p>
		<?php echo getButtonsHTML($theme->HFBSets[$theme->ComHFB]['button'], $mod->getButtonsContent()); ?>
	</div>
	<?php 
} 
?>